package Day02;

public class Demo04 {
    public static void main(String[] args) {
        //冒泡排序
        int[] a = {12,1,5,1,51,5,42,5,1,542,666};
        for (int i = 0; i < a.length - 1; i++) {
            for (int j = 0; j < a.length - i -1; j++) {
                int s;
                if(a[j] > a[j+1]){
                    s = a[j];
                    a[j] = a[j+1];
                    a[j+1] = s;
               }
            }
        }
    }
}
